<template>
  <div class="index-footer">
    <footer class="footer">
      <div class="content has-text-centered">
        <p>
          <a @click="$router.push('/about')">关于</a>
          ·
          <a @click="$router.push('/link')">友链</a>
          ·
          <a href="https://gitee.com/cjf8134/bbs-client.git" target="_blank">Github</a>
        </p>
        <p>
          © 2012-2020 Golang China
        </p>
        <p>
          Build by <a href="https://gitee.com/cjf8134/bbs-serve.git" target="_blank">Gopher</a>,
          Powered by <a href="https://gitee.com/cjf8134/bbs-client.git" target="_blank">Tango0.5.5.0412</a>,
          Based on <a href="https://bulma.io/" target="_blank">Bulma</a>.
        </p>
        <p>
          Version: 2.0.5, Build version go1.12.7. 1ms.
        </p>
      </div>
    </footer>
  </div>
</template>

<script>
  export default {
    name: 'index-footer',
    data() {
      return {
        
      }
    },
    methods: {
      // 统一使用replace
      router(path) {
        if(this.$route.path == path) return
        this.$router.replace(path)
      },
      // 跳转到关于页
      about() {
        this.router('/about')
      },
    }
  }
</script>

<style scoped>
  .index-footer{
    clear: both;
    text-align: center;
  }
  .footer {
    background-color: #f6f6f6;
    padding: 1.5rem 1.5rem 1.5rem;
  }
  .has-text-centered {
    text-align: center!important;
  }
  .has-text-centered a{
    cursor: pointer;
  }

  p {
    display: block;
    margin-block-start: 1em;
    margin-block-end: 1em;
    margin-inline-start: 0px;
    margin-inline-end: 0px;
  }
  p a{
    color: #3273dc;
    cursor: pointer;
    text-decoration: none;
  }
</style>
